﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Vote.Web.Models
{
    public class VoteViewModel
    {
        public int GroupID { get; set; }
        // 投票标题
        public string VoteName { get; set; }

        public string GroupDesc { get; set; }
        public int MinSelectedCount { get; set; }
        public int MaxSelectedCount { get; set; }

        /// <summary>
        /// 0: 文字投票 1:图文投票 2：视频投票
        /// </summary>
        public int VoteType { get; set; }

        // 投票选项
        public List<VoteItemViewModel> VoteItemList { get; set; }
    }

    public class VoteItemViewModel
    {
        public int ItemID { get; set; }

        public string ItemName { get; set; }

        public string Introduction { get; set; }

        public string RelationVideo { get; set; }

        private string _ImageUrl;
        public string ImageUrl
        {
            get { return string.IsNullOrWhiteSpace(_ImageUrl) ? "../ResStatic/Images/noimage.png" : _ImageUrl; }
            set { _ImageUrl = value; }
        }
    }
}